﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using WpfStarterKit.Framework.Commands;
using WpfStarterKit.Framework.ViewModel;

namespace WpfStarterKit.SampleApplication.Screens.PassingDataAttributes.DataAttributesPage1
{
    public class DataAttributesPage1ViewModel : UserInterfaceViewModel
    {
        public DataAttributesPage1ViewModel()
        {
            HomeCommand = new NavigationCommand(NavigationActions.Start);
            Page2Command = new NavigationCommand(NavigationActions.DataAttributesPage2);
        }

        public virtual ICommand HomeCommand { get; set; }
        public virtual ICommand Page2Command { get; set; }

        [Provide(PropertyName = WellKnownProperties.DataFromPage1)]
        public virtual string Data { get; set; }

        public virtual string ReturnMethodCalled { get; set; }

        [ReturnMethod(NavigationActions.Start)]
        public void NavigatedFromHome()
        {
            ReturnMethodCalled = "NavigatedFromHome";
        }

        [ReturnMethod(NavigationActions.DataAttributesPage2)]
        public void NavigatedFromPage2()
        {
            ReturnMethodCalled = "NavigatedFromPage2";
        }
    }
}
